
public class mattest
 {

	public static void main(String[] args)
	{
	
// Generate Random Matrix

		int[] randGen = matrix.GenerateRandArray(10);
		matrix.printIntArray(randGen);
		int[][] genmat = matrix.GenerMultiArray(2,3);
		matrix.printMatrix(genmat);

// Addition of two matrix

		int[][] M1 = { {1,2} , {2,3} };
		int[][] M2 = { {1,3} , {2,3} };
		
		int[][] res = matrix.addMat(M1,M2);
		matrix.printMatrix(res);

//Multiplication of two matrix		
		
		int[][] Mulres = matrix.mulMat(M1,M2);
		matrix.printMatrix(Mulres);

//Sum of Matrix

		long sum = matrix.sumMatrix(M2);
		System.out.println("Sum of Matrix is " + sum);

// Sum of Rows in Matrix

		int sum1[] = matrix.sumRow(M1);
		for(int i=0;i<sum1.length;i++)
		System.out.println(sum1[i]); 
		
// Sum of Columns in Matrix

		int Sum2[] = matrix.sumCol(M2);
		for(int i=0;i<Sum2.length;i++)
		System.out.println(Sum2[i]);  

// Bubble Sort

		int[] bubSort = matrix.GenerateRandArray(10);
		System.out.print("\n\nBubble Sort \t");
		matrix.printIntArray(bubSort);
		matrix.bubbleSort(bubSort);		
		System.out.print("\nBubble Sorted   ");
		matrix.printIntArray(bubSort);
		
// Selection Sort

		int[] selSort = matrix.GenerateRandArray(10);
		//int[] matS = {10,2,3,7,5};
		System.out.print("\n\nSelection Sort  \t");
		matrix.printIntArray(selSort);
		matrix.selectionSort(selSort);		
		System.out.print("\nSelection Sorted   ");
		matrix.printIntArray(selSort);		
	}

}